from agno.agent import Agent
from agno.models.openai import OpenAILike
from agno.tools.sql import SQLTools

from configs.basic_config import ALI_GENERATION_MODEL, AGENT_URL, ALI_DASHSCOPE_API_KEY, REMOTE_URL, ALI_THINK_MODEL

agent = Agent(
    model=OpenAILike(id=ALI_GENERATION_MODEL, #ALI_THINK_MODEL,
                     #name=ALI_GENERATION_MODEL,
                     api_key=ALI_DASHSCOPE_API_KEY,
                     base_url=AGENT_URL), #AGENT_URL
    #tools=[SQLTools(db_url="sqlite:///database.db")],
    tools=[SQLTools(db_url="sqlite:///workflow.db", instructions="始终用汉语输出中间结果和最终答案")],
    markdown=True,
    debug_mode=True,

)
agent.print_response("显示数据库中所有表及其结构 （用汉语返回答案）")
#agent.print_response("显示workflow_session表里的所有数据（用汉语返回答案）")